Class yassl.parser
All Packages This Package Previous Next
Class yassl.parser
java.lang.Object
|
+----yassl.parser
-
public class
parser
-
extends Object
-
implements lexemes
This is a simple recursive descent parser, with operator
precedence implemented using the trick stolen from javac
which reorders the parse tree
-
parser()
-
-
parser(Applet)
-
-
lambda()
-
process a lambda declaration.
-
main(String[])
-
-
match(int)
-
This checks that the input token matches the expected token.
-
parse(InputStream)
-
This is the toplevel parsing cycle.
-
stmt()
-
An individual statement.
-
term()
-
parser
public parser()
parser
public parser(Applet c)
parse
public pnode parse(InputStream in) throws IOException, parserError, yasslError
-
This is the toplevel parsing cycle.
lambda
public pnode lambda() throws IOException, parserError
-
process a lambda declaration.
<(> [ [, ]] <)>
<{> stmtlist; <}>
stmt
public pnode stmt() throws IOException, parserError
-
An individual statement.
Statements are things that arent method or field
declarations.
stmt
-> <{> (stmt)* <}>
-> expr <;>
-> <(> expr <)> stmt
-> <(> expr <)> stmt stmt
-> <(> expr <)> stmt
-> <(> expr <;> expr <;> expr <)> stmt
term
public pnode term() throws IOException, parserError
match
public void match(int val) throws IOException, parserError
-
This checks that the input token matches the expected token.
It also advances the token to the next one.
main
public static void main(String argv[]) throws IOException, parserError, yasslError
All Packages This Package Previous Next